<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
	body { font-family: 돋움; font-size:9pt }
	td { font-family: 돋움; font-size:9pt }
</style>
<script type="text/javascript">

function employeesearch(){
	var  frm1 = document.form2;
	var  d2 = frm1.d2.value;
	
   alert("ggg");

}
</script>

<title>Insert title here</title>
</head>
<body>
	
	<center>
		<h1>직원조회</h1>
	</center>
	<table border=1 width=800 height=20 align=center>
	<form method="post" action="searchEmployee.do">
	
 		<select name="type">
			<option value="1" selected="true">이름검색</option>
			<option value="2">사번검색</option>
		</select>
		&nbsp;&nbsp;입력 값:&nbsp;<input type="text" name="field" /> 
		<Input type="submit" value="검색" name="d2" onclick="employeesearch()"
			style="color: black; FONT-SIZE: 12pt; height: 25px;">
			
	</form>
	<form method="post" name="employeeresult">
		<tr>
			<td width=50 align=center>employeeId</td>
			<td width=70 align=center>mame</td>
			<td width=100 align=center>eMail</td>
			<td width=90 align=center>phoneNumber</td>
			<td width=70 align=center>hireDate</td>
			<td width=70 align=center>jobId</td>
			<td width=80 align=center>salary</td>
			<td width=90 align=center>commission</td>
			<td width=60 align=center>managerId</td>
			<td width=70 align=center>departmentId</td>
		</tr>
		<c:if test="${fn:length(requestScope.result) > 0}">
			<c:forEach var="i" items="${requestScope.result}">
				<tr>
					<td>${i.employeeId }</td>
					<td>${i.firstName } / ${i.lastName}</td>
					<td>${i.eMail }</td>
					<td>${i.phoneNumber }</td>
					<td>${i.hireDate }</td>
					<td>${i.jobId }</td>
					<td>${i.salary }</td>
					<td>${i.commission }</td>
					<td>${i.managerId }</td>
					<td>${i.departmentId }</td>
				</tr>
			</c:forEach>
		 </c:if>
		 </form>
		</table>
</body>
</html>